'''
@-*- coding: utf-8 -*-
@ python:python 3.9
@ 创建人员:allen
@ 创建时间:2024/8/19
'''

import matplotlib.pyplot as plt
from matplotlib import font_manager

#导入字体
plt.rcParams['font.family'] = 'Microsoft YaHei'  # 替换为你选择的字体

y = [1,2,3,4,5,23,56,3,6,57]

x = range(20,30)

plt.figure(figsize=(10,6),dpi=100)

plt.plot(x,y)

#1岁...
_xtick_lables = ["{}岁".format(i) for i in x]

plt.xticks(x,_xtick_lables)

plt.show()
